<?php
/**
 * @version 0.8.3 2010-10-07
 * @package Joomla
 * @subpackage LeagueResults
 * @copyright (C)  2008, 2009, 2010 Henryk Drozd
 * @license GNU/GPL, see LICENSE.php
 * LeagueResults is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * LeagueResults is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');?>

<div class="componentheading">
<?php echo JText::_( 'TEAMS OF THE SEASON' ); ?>
</div>

<a href="<? echo $this->backlink; ?>">
	<?php echo JText::_( 'RETURN TO SEASON LIST' ); ?>
</a><br/><br/>
<table class="seasonheading">
<tr><td><? echo $this->list[0]->name; ?></td></tr>
<tr><td><? echo $this->list[0]->longname; ?></td></tr>
<tr><td><? echo $this->list[0]->year; ?></td></tr>
</table>

<table class="seasonteamstable">
	
<tr class="contentheading">
	<th><?php echo JText::_( 'TEAMS' ); ?></th>
	</tr>
<?php foreach ($this->list as $l): ?>
<tr><td>

	<?php if ($this->settings->frontend_images == 1) {?>
			<img src="<?php echo $this->settings->tbadge_folder.$l->tbadge; ?>" />
			<?php }?>

		<?php switch (JRequest::getVar('links_ondisplay')){ 
				case 'none':
				default:
					echo $l->teamname;
					break;
				case 'team':
			?>
			    	<a href="<?php echo $l->link; ?>">
					<?php echo $l->teamname; ?></a>
			<?php 
					break;
				case 'club':
			?>
			    	<a href="<?php echo $l->clublink; ?>">
					<?php echo $l->teamname; ?></a>
			<?php 
					break;
					case 'website':
			?>
			    	<a href="<?php echo $l->url; ?>">
					<?php echo $l->teamname; ?></a>
			<?php
					break;
			}
		?>


</td></tr>
<?php endforeach; ?>

</table>

